CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
PROJECT(GNSS)
message("\n GNSS system\n")
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
include_directories(
        ${PROJECT_SOURCE_DIR}/inc
)
include_directories(${PROJECT_SOURCE_DIR}/matrix)
aux_source_directory(./src SRC_FILES)
aux_source_directory(./matrix SRC_FILES)
message("add src\n")
find_library(WIRINGPI_LIBRARIES NAMES wiringPi)
find_path(WIRINGPI_INCLUDE_DIRS NAMES wiringPi.h)
message("\n add lib:wiringPi\n")
include(FindPackageHandleStandardArgs)
include_directories(inc)
link_libraries(m)
link_directories("/usr/lib/arm-linux-gnueabihf/")
add_executable(GNSS ${SRC_FILES})
find_package_handle_standard_args(wiringPi DEFAULT_MSG WIRINGPI_LIBRARIES WIRINGPI_INCLUDE_DIRS)
target_link_libraries (GNSS /usr/lib/arm-linux-gnueabihf/libssl.so /usr/lib/arm-linux-gnueabihf/libcrypto.so)
target_link_libraries(GNSS ${WIRINGPI_LIBRARIES}) 
target_link_libraries(GNSS ${CMAKE_THREAD_LIBS_INIT})
message("\n target link:openssl\n")